package cn.unknowpupil.domain.system;

import cn.unknowpupil.common.core.annotation.Excel;
import cn.unknowpupil.common.mybatis.base.SuperEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;


/**
 * Created at 2020-10-21 by  w10g <br>
 * Initialize SysMenu  ... <br>
 *  菜单权限表
 *
 * @author unknowpupil
 * @since 0.0.1
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_menu")
@ApiModel(value = "SysMenu 域", description = "菜单权限表")
public class SysMenu extends SuperEntity<SysMenu> {

private static final long serialVersionUID=1L;
    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称")
    @Excel(name = "菜单名称")
    @TableField(value ="menu_name")
    private String menuName;
    /**
     * 父菜单ID
     */
    @ApiModelProperty(value = "父菜单ID")
    @Excel(name = "父菜单ID")
    @TableField(value ="parent_id")
    private Long parentId;
    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    @Excel(name = "显示顺序")
    @TableField(value ="order_num")
    private Integer orderNum;
    /**
     * 路由地址
     */
    @ApiModelProperty(value = "路由地址")
    @Excel(name = "路由地址")
    @TableField(value ="path")
    private String path;
    /**
     * 组件路径
     */
    @ApiModelProperty(value = "组件路径")
    @Excel(name = "组件路径")
    @TableField(value ="component")
    private String component;
    /**
     * 是否为外链（0是 1否）
     */
    @ApiModelProperty(value = "是否为外链（0是 1否）")
    @Excel(name = "是否为外链（0是 1否）")
    @TableField(value ="is_frame")
    private Integer isFrame;
    /**
     * 是否缓存（0缓存 1不缓存）
     */
    @ApiModelProperty(value = "是否缓存（0缓存 1不缓存）")
    @Excel(name = "是否缓存（0缓存 1不缓存）")
    @TableField(value ="is_cache")
    private Integer isCache;
    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    @ApiModelProperty(value = "菜单类型（M目录 C菜单 F按钮）")
    @Excel(name = "菜单类型（M目录 C菜单 F按钮）")
    @TableField(value ="menu_type")
    private String menuType;
    /**
     * 菜单状态（0显示 1隐藏）
     */
    @ApiModelProperty(value = "菜单状态（0显示 1隐藏）")
    @Excel(name = "菜单状态（0显示 1隐藏）")
    @TableField(value ="visible")
    private String visible;
    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识")
    @Excel(name = "权限标识")
    @TableField(value ="perms")
    private String perms;
    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标")
    @Excel(name = "菜单图标")
    @TableField(value ="icon")
    private String icon;

    /** 子菜单 */
    @ApiModelProperty(value = "子菜单")
    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<SysMenu>();
}